<?php

/**
 * @author Martin Pernica
 * @copyright 2008
 */
echo '<h2>Nejnovější články</h2><ul>';
$query = $GLOBALS['db']->query("SELECT id, title FROM ".$GLOBALS['db_prefix']."articles WHERE published = '1' ORDER BY date DESC LIMIT 10") or die($GLOBALS['db']->error);
while($data = $query->fetch_array()){
	echo '<li><a href="'.$GLOBALS['url'].'index.php?q=content/'.$data[0].'">'.$data[1].'</a></li>';
}
echo '</ul>';
?>